const im = {
  state: {},

  mutations: {},
  actions: {
    // 向IM系统发送消息
    postMsgToIM({ commit }, obj) {
      if (window.top) {
        if(process.env.NODE_ENV=='development'){
           // 开发环境
           window.top.postMessage(JSON.stringify(obj), "http://192.168.3.60:808");
           window.top.postMessage(JSON.stringify(obj), "http://192.168.3.101:808");
        }else{
         // 正式环境
         window.top.postMessage(JSON.stringify(obj), "https://erp.yuduhulian.com");
        }
      }
    },
  },
};

export default im;
